package cn.hyatt.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户角色
 *
 * @author hyatt
 */
@Getter
@Setter
@TableName(value = "system_user_role")
@Schema(name = "用户角色")
public class SystemUserRole implements Serializable {

    @Serial
    private static final long serialVersionUID = 42L;

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键Id")
    private Long id;

    @NotNull
    @TableField(value = "user_id")
    @Schema(description = "用户Id")
    private Long userId;

    @NotNull
    @TableField(value = "role_id")
    @Schema(description = "角色Id")
    private Long roleId;

}
